function [f,df]=f_ola_pfijo(y,p)
% ejecutar [f,df]=f_ola_imp(x,p)
% donde p=[1,0] calcula f
%       p=[0,1] calcula df
%       p=[1,1] calcula f y df
f=[];
df=[];
if nargin<2
    p=[1,0];
end
global x

if x<=1.5  %0.5*exp(1)
	if p(1)==1
	   f=exp(-(1-x*y).^2);
	end
	if p(2)==1
	   df=2*x*(1-x*y).*exp(-(1-x*y).^2);
	end
else
	if p(1)==1
	   f=1/x*(1-sign(1-x*y).*sqrt(-log(y)));
	end
	if p(2)==1
	   df=sign(1-x*y)./(2*x*y.*sqrt(-log(y)));
	end
end

